<!DOCTYPE HTML>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
		<title></title>
		<link rel="stylesheet" type="text/css" href="../../css/aui/aui-win.css" />
		<style type="text/css">
			.aui-bar-1d9dd5 {
				background: #4385f6;
			}
			#question-channel {
				line-height: normal;
				height: 41px;
				background: #fff;
				width: 100%;
				margin-top: 45px;
				padding-top: 9px;
			}
			#question-channel .tab {
				width: 208px;
				height: 32px;
				margin: 0 auto;
			}
			#question-channel .tab p {
				color: #4385f6;
				float: left;
				font-size: 16px;
				height: 28px;
				line-height: 28px;
				width: 100px;
				border: 2px solid #4385f6;
			}
			#question-channel .tab p:nth-child(1) {
				border-radius: 5px 0 0 5px;
				-webkit-border-radius: 5px 0 0 5px;
				border-width: 2px 1px 2px 2px;
			}
			#question-channel .tab p:nth-child(2) {
				border-radius: 0 5px 5px 0;
				-webkit-border-radius: 0 5px 5px 0;
				border-width: 2px 2px 2px 1px;
			}
			#question-channel .tab p.active {
				background: #4385f6;
				color: #fff;
			}
		</style>
	</head>
	<body>
		<header class="aui-bar aui-bar-nav aui-bar-1d9dd5" id='aui-header'>
			<a class="aui-pull-left" onclick="H.$closeCurrentWin();"> <span class="aui-iconfont aui-icon-left"></span>返回 </a>
			<div class="aui-title">
				我的问答
			</div>
			<nav id="question-channel">
				<div class="tab">
					<p class="active">
						我提问的
					</p>
					<p>
						我解答的
					</p>
				</div>
			</nav>
		</header>
	</body>
	<script type="text/javascript" src="../../script/AHelper.js"></script>
	<script type="text/javascript" src="../../script/zepto.min.js"></script>
	<script type="text/javascript">
		function setStyle(index) {
			var that = $(".tab p").eq(index);
			that.addClass("active").siblings("p").removeClass("active");
		}

		Zepto(function($) {
			$(".tab p").on("tap", function() {
				var index = $(this).index();
				setStyle(index);
				// 设置索引
				H.$setFrameGroupIndex('groups', index, true);
			});
		});
		H.ready(function() {
			H.$openFrameGroupWithNav(function(ret, err) {
				setStyle(ret.index);
			}, 'aui-header', {
				name : 'groups',
				frames : [{
					url : 'myQuestion_body.html',
					name : 'myQuestion_body'
				}, {
					url : 'myAnswer_body.html',
					name : 'myAnswer_body'
				}]
			});
		});
	</script>
</html>